<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

	<xsl:import href="toXMIFunction.xsl"/>
	<xsl:import href="toXMI.xsl" />
	
	<xsl:template match="/">
		<xsl:apply-imports />
	</xsl:template>
	
	
	<!-- ****************** noeud 'Generalization' ****************** -->
	<xsl:template match="Generalization" >
		<xsl:variable name="idRef" select="Generalization.parent/GeneralizableElement/@xmi.idref" />
		<xsl:choose>
			<xsl:when test="//Interface[@xmi.id=$idRef]">
				<xsl:apply-templates select="." mode="Implementation" />
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="." mode="Generalization" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
</xsl:stylesheet>
